package me.aartikov.flowsample;


import me.aartikov.alligator.DestinationType;
import me.aartikov.alligator.TransitionType;
import me.aartikov.alligator.animations.AnimationData;
import me.aartikov.alligator.animations.SimpleTransitionAnimation;
import me.aartikov.alligator.animations.TransitionAnimation;
import me.aartikov.alligator.animations.providers.TransitionAnimationProvider;
import me.aartikov.alligator.Screen;


public class SampleTransitionAnimationProvider implements TransitionAnimationProvider {
    @Override
    public TransitionAnimation getAnimation(TransitionType transitionType,
                                            DestinationType destinationType,
                                            Class<? extends Screen> screenClassFrom,
                                            Class<? extends Screen> screenClassTo,
                                            AnimationData animationData) {
        switch (transitionType) {
            case REPLACE:
            case RESET:
                return null;
            case BACK:
                return new SimpleTransitionAnimation(TransitionAnimation.LEFT, TransitionAnimation.RIRHT);
            case FORWARD:
            default:
                return new SimpleTransitionAnimation(TransitionAnimation.RIRHT, TransitionAnimation.LEFT);
        }
    }
}
